
use "$path/Data/mentorship_meetings.dta", clear

** Footnote 12
tab ym_d6b if treatment == 2
tab ym_d5

** Footnote 34
gen year_meet = yofd(dofc(ym_meeting_begin))
bys year_meet: sum ym_d2

*------------------------------------------------------------------------------------

** Footnote 11
use "$path/Data/working.dta", clear
keep if _merge_midline != . // non-missing for first set of 1,852 rows
keep if mentor == 1
keep if r_mentor == 1
tab ls_s5

*------------------------------------------------------------------------------------

use "$path/Data/working.dta", clear
keep if sample == 1

** Sample in Section 3.1
gen secondary = b_p12 >= 14 if b_p12 != .
tab secondary if wave_flag == 1 & sample == 1

gen age_18_30 = inrange(b_age,18,30) if age != .
tab age_18_30 if wave_flag == 1 & sample == 1


** Mentorship by a Refugee paragraph in Section 3.3
gen networks_diff_country = (b_bn4___1 != 1 & b_bn4___1 != .) | (b_bn4___2 != 1 & b_bn4___2 != .) | (b_bn4___3 != 1 & b_bn4___3 != .) | (b_bn4___1 != 4 & b_bn4___4 != .) if wave_midline == 1
tab networks_diff_country

tab b_e14 if wave_midline == 1

** Perceptions of Mentorship in Section 4.1
tab e2_yp9 if treatment < 3
tab e2_yp14

** Section 4.1 OYOH call answer share
tab oyoh_answered if wave_flag == 4

** Footnote 22
tab b_d19 if treatment == 6 & wave_flag == 1
tab m_cov16 if treatment == 6

** Footnote 38
tab e2_yp10 if treatment == 2 & wave == 4, m
tab e2_yp11 if treatment == 2 & wave == 4, m

*------------------------------------------------------------------------------------

** Comparing Attitudes in Uganda and Kenya in Section 2.3
use "$path/Data/working.dta", clear
tab e2_j6 if treatment == 6

use "$path/Data/raw_kenya.dta", clear
tab e_rf6 if ref_control == 1


*------------------------------------------------------------------------------------
* App C6
use "$path/Data/working.dta", clear

* share who talked to anyone about their program
count if e2_pf20 == 1 & sample == 1
local talked_num = r(N)

count if e2_pf20 != . & sample == 1
local talked_denom = r(N)

local share_talked = round(`talked_num'/`talked_denom',0.01)

* share who talked to another business owner in Kampala about their program

count if e2_pf21_4 == 1 & sample == 1
local talked_bus_num = r(N)

local share_talked_bus = round(`talked_bus_num'/`talked_denom',0.01)

disp "share_talked = `share_talked'"
disp "share_talked_bus = `share_talked_bus'"

** share of control group who heard YARID was associated with refugees from a program participant

count if e2_yf2a_5 == 1 & treatment == 6 & sample == 1
local control_heard_num = r(N)

count if e2_yf1u != . & treatment == 6 & sample == 1
local control_heard_denom = r(N)

local share_control_heard = round(`control_heard_num'/`control_heard_denom',0.01)

disp "share_control_heard = `share_control_heard'"

** share of grant only group who heard YARID was associated with refugees from a program participant

count if (e2_yf2a_5 == 1 | e2_yp8_5 == 1) & treatment == 3 & sample == 1
local grant_heard_num = r(N)

count if (e2_yf1u != . | e2_yp6 != "") & treatment == 3 & sample == 1
local grant_heard_denom = r(N)

local share_grant_heard = round(`grant_heard_num'/`grant_heard_denom',0.01)

disp "share_grant_heard = `share_grant_heard'"
